﻿{include file="common/header" /}
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="myform">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>WareHouse：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<select name="WareHouse" id="WareHouse" class="input-text" style="width: 150px;">
					<option value="0">请选择货仓</option>
					<option value="1600">Richmond</option>
					<option value="1200">Milpitas</option>
					<option value="1050">Maywood</option>
					<option value="1400">Stockton</option>
				</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red"></span>CustID：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="CustID" id="CustID" name="CustID">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>CustName：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="CustName" id="CustName" name="CustName">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>Address：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="Address" id="Address" name="Address">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>HouseNumber：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="HouseNumber" id="HouseNumber" name="HouseNumber">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>是否在菜单显示：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<span class="select-box">
				<select class="select valid" size="1" name="IsShow">
					<option value="1">显示</option>
					<option value="0">不显示</option>
				</select>
				</span>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>图标样式：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="图标样式" id="Style" name="Style">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<button type="button" class="btn btn-success radius" id="save-btn" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
	</form>
</article>
<script>
	$('#save-btn').click(function () {
        $.ajax({
            type: "POST",
            dataType: "json",
            url: "{{:url('permission/create','',false)}}" ,
            data: $('#myform').serialize(),
            success: function (result) {
                if (result.code == 200) {
                    layer.msg('添加成功!',{icon:1,time:1000},function (index) {
                        parent.getData();
                    });
                }else{
                    layer.msg(result.msg,{icon:1,time:1000});
				}
            },
            error : function() {
                layer.msg('异常!',{icon:1,time:100000000});

            }
        });
    })
</script>
{include file="common/header" /}